package com.shihb.structuralpatterns.decoratorpattern;/**
 *Description:被装饰者的缓冲层和具体实现
 *Version:1.0.0
 *@author shihb
 *@date 2020/7/18 21:16
 */
public class Coffee extends Drink {
  @Override
  Double cost() {
    return getPrice();
  }
}

class AmericanCoffee extends Coffee{

  public AmericanCoffee() {
    setDes("美式咖啡");
    setPrice(38.0D);
  }
}
class ItalicaCoffee extends  Coffee{
  public ItalicaCoffee() {
    setDes("意式咖啡");
    setPrice(39.0D);
  }

}
class  Mocha extends  Coffee{
  public Mocha() {
    setDes("摩卡咖啡");
    setPrice(37.0D);
  }

}
